package com.cykj.eurekaclient.controller;

import com.cykj.eurekaclient.bean.RouteInfo;
import com.cykj.eurekaclient.service.RouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @author: zhiMing
 * @date: 2021/9/22 9:00
 * @desc: 处理有关路线请求的控制层
 */
@RestController
public class RouteController {

    @Autowired
    RouteService routeService;

    /**
     * @version 1.0
     * @author: zhiMing
     * @date: 2021/9/22 9:00
     * @desc: 根据路线信息获取该路线的发车时刻集合
     */
    @RequestMapping("/getTimeNodeList")
    public RouteInfo getTimeNodeList(@RequestParam("routeName") String routeName){
        //参数为实体类对象，返回结果为实体类对象
        return routeService.getTimeNodeList(routeName);
    }
}
